/**
 * Created with IntelliJ IDEA.
 * Description: 方法重载
 * User: 阿宾
 * Date: 2024-05-04
 * Time: 16:36
 */
public class Test02 {
    public static int add(int x,int y){
        return x+y;
    }
    public static double add(double x,double y){
        return x+y;
    }
    public static double add(int x,int y,int z){
        return x+y+z;
    }
    public static void main(String[] args) {
        int a = 10,b = 20,z = 30;
        System.out.println(add(a, b));
        System.out.println(add(a, b, z));

        double a1 = 10,b1 = 20;
        System.out.println(add(a1,b1));


    }
}
